
<html lang=""><head>
    <title>操作反馈 · MINA</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <meta name="description" content="">
    <meta name="generator" content="GitBook 3.2.0">




    <link rel="stylesheet" href="../../gitbook/style.css">




    <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">



    <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">























    <meta name="HandheldFriendly" content="true">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">


    <link rel="next" href="modal.html">


    <link rel="prev" href="switch.html">


</head>
<body>

<div class="book with-summary">
    <div>

        <div class="sub_nav_box">
            <div class="sub_nav_inner">




                <ul class="top_sub_nav">




                    <li class="sub_nav_item " data-level="1.1" data-path="../">

                        <a href="../">


                            简易教程

                        </a>

                    </li>

                    <li class="sub_nav_item " data-level="1.2" data-path="../framework/MINA.html">

                        <a href="../framework/MINA.html">


                            框架

                        </a>

                    </li>

                    <li class="sub_nav_item selected" data-level="1.3" data-path="./">

                        <a href="./">


                            组件

                        </a>

                    </li>

                    <li class="sub_nav_item " data-level="1.4" data-path="../api/">

                        <a href="../api/">


                            API

                        </a>

                    </li>

                    <li class="sub_nav_item " data-level="1.5" data-path="../devtools/devtools.html">

                        <a href="../devtools/devtools.html">


                            工具

                        </a>

                    </li>

                    <li class="sub_nav_item " data-level="1.6" data-path="../qa/qa.html">

                        <a href="../qa/qa.html">


                            Q&amp;A

                        </a>

                    </li>




                </ul>




                <!-- <h1>操作反馈</h1> -->
                <div id="book-search-input" role="search">
                    <form>
                        <label for="search-input" class="search-icon" id="js-search-icon"></label>
                        <input type="text" id="search-input" name="search-input" placeholder="搜索">
                        <button type="reset" class="clear-input-btn"></button>
                    </form>
                </div>
            </div>
        </div>

        <div class="book-summary">


            <nav role="navigation">





                <ul class="summary">


                    <li class="chapter  open" data-level="1.3.1" data-path="view.html">

                        <a href="view.html">


                            视图容器

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.1.1" data-path="view.html">

                                <a href="view.html">


                                    view

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.1.2" data-path="scroll-view.html">

                                <a href="scroll-view.html">


                                    scroll-view

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.1.3" data-path="swiper.html">

                                <a href="swiper.html">


                                    swiper

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.2" data-path="icon.html">

                        <a href="icon.html">


                            基础内容

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.2.1" data-path="icon.html">

                                <a href="icon.html">


                                    icon

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.2.2" data-path="text.html">

                                <a href="text.html">


                                    text

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.2.3" data-path="progress.html">

                                <a href="progress.html">


                                    progress

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.3" data-path="button.html">

                        <a href="button.html">


                            表单组件

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.3.1" data-path="button.html">

                                <a href="button.html">


                                    button

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.2" data-path="checkbox.html">

                                <a href="checkbox.html">


                                    checkbox

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.3" data-path="form.html">

                                <a href="form.html">


                                    form

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.4" data-path="input.html">

                                <a href="input.html">


                                    input

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.5" data-path="label.html">

                                <a href="label.html">


                                    label

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.6" data-path="picker.html">

                                <a href="picker.html">


                                    picker

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.7" data-path="radio.html">

                                <a href="radio.html">


                                    radio

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.8" data-path="slider.html">

                                <a href="slider.html">


                                    slider

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.9" data-path="switch.html">

                                <a href="switch.html">


                                    switch

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter active open" data-level="1.3.4" data-path="action-sheet.html">

                        <a href="action-sheet.html">


                            操作反馈

                        </a>



                        <ul class="articles">


                            <li class="chapter active " data-level="1.3.4.1" data-path="action-sheet.html">

                                <a href="action-sheet.html">


                                    action-sheet

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.4.2" data-path="modal.html">

                                <a href="modal.html">


                                    modal

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.4.3" data-path="toast.html">

                                <a href="toast.html">


                                    toast

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.4.4" data-path="loading.html">

                                <a href="loading.html">


                                    loading

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.5" data-path="navigator.html">

                        <a href="navigator.html">


                            导航

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.5.1" data-path="navigator.html">

                                <a href="navigator.html">


                                    navigator

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.6" data-path="audio.html">

                        <a href="audio.html">


                            媒体组件

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.6.1" data-path="audio.html">

                                <a href="audio.html">


                                    audio

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.6.2" data-path="image.html">

                                <a href="image.html">


                                    image

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.6.3" data-path="video.html">

                                <a href="video.html">


                                    video

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.7" data-path="map.html">

                        <a href="map.html">


                            地图

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.7.1" data-path="map.html">

                                <a href="map.html#map">


                                    map

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.8" data-path="canvas.html">

                        <a href="canvas.html">


                            画布

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.8.1" data-path="canvas.html">

                                <a href="canvas.html#canvas">


                                    canvas

                                </a>



                            </li>


                        </ul>

                    </li>


                </ul>


            </nav>


        </div>

        <div class="book-body">

            <div class="body-inner">

                <!--

                <div class="book-header" role="navigation">

                </div>


                 -->

                <div class="page-wrapper" tabindex="-1" role="main">
                    <div class="page-inner">

                        <div id="book-search-results">
                            <div class="search-noresults">

                                <section class="normal markdown-section">

                                    <h4 id="action-sheet">action-sheet</h4><p>从屏幕底部出现的菜单表。</p><table>
                                    <thead>
                                    <tr><th>属性名</th>
                                        <th>类型</th>
                                        <th>默认值</th>
                                        <th>说明</th>
                                    </tr></thead><tbody>
                                <tr><td>hidden</td>
                                    <td>Boolean</td>
                                    <td>true</td>
                                    <td>是否隐藏</td>
                                </tr><tr><td>bindchange</td>
                                    <td>EventHandle</td>
                                    <td></td>
                                    <td>点击背景或action-sheet-cancel按钮时触发change事件，不携带数据</td>
                                </tr></tbody></table>

                                    <h4 id="action-sheet-item">action-sheet-item</h4><p>底部菜单表的子选项。</p><h4 id="action-sheet-cancel">action-sheet-cancel</h4><p>底部菜单表的取消按钮，和action-sheet-item的区别是，点击它会触发action-sheet的change事件，并且外观上会同它上面的内容间隔开来。</p><p><strong>示例代码：</strong></p><pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"default"</span> <span class="hljs-attr">bindtap</span>=<span class="hljs-string">"actionSheetTap"</span>&gt;</span>弹出action sheet<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">action-sheet</span> <span class="hljs-attr">hidden</span>=<span class="hljs-string">"{{actionSheetHidden}}"</span> <span class="hljs-attr">bindchange</span>=<span class="hljs-string">"actionSheetChange"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">block</span> <span class="hljs-attr">wx:for-items</span>=<span class="hljs-string">"{{actionSheetItems}}"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">action-sheet-item</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"item"</span> <span class="hljs-attr">bindtap</span>=<span class="hljs-string">"bind{{item}}"</span>&gt;</span>{{item}}<span class="hljs-tag">&lt;/<span class="hljs-name">action-sheet-item</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">block</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">action-sheet-cancel</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"cancel"</span>&gt;</span>取消<span class="hljs-tag">&lt;/<span class="hljs-name">action-sheet-cancel</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">action-sheet</span>&gt;</span></code></pre>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> items = [<span class="hljs-string">'item1'</span>, <span class="hljs-string">'item2'</span>, <span class="hljs-string">'item3'</span>, <span class="hljs-string">'item4'</span>]
<span class="hljs-keyword">var</span> pageObject = {
  data: {
    actionSheetHidden: <span class="hljs-literal">true</span>,
    actionSheetItems: items
  },
  actionSheetTap: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>) </span>{
    <span class="hljs-keyword">this</span>.setData({
      actionSheetHidden: !<span class="hljs-keyword">this</span>.data.actionSheetHidden
    })
  },
  actionSheetChange: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>) </span>{
    <span class="hljs-keyword">this</span>.setData({
      actionSheetHidden: !<span class="hljs-keyword">this</span>.data.actionSheetHidden
    })
  }
}

<span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i &lt; items.length; ++i) {
  (<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">itemName</span>) </span>{
    pageObject[<span class="hljs-string">'bind'</span> + itemName] = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>) </span>{
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'click'</span> + itemName, e)
    }
  })(items[i])
}

Page(pageObject)</code></pre>
                                    <p><img alt="action-sheet" src="../image/pic/action-sheet.png"></p>

                                </section>

                            </div>
                            <div class="search-results">
                                <div class="has-results">

                                    <h1 class="search-results-title"><span class="search-results-count"></span> 个结果 "<span class="search-query"></span>"</h1>
                                    <ul class="search-results-list"></ul>

                                </div>
                                <div class="no-results">

                                    <h1 class="search-results-title">没有找到相关内容 "<span class="search-query"></span>"</h1>

                                </div>
                            </div>
                        </div>

                    </div>
                </div>
                <div class="foot" id="footer">
                    <ul class="links ft">
                        <li class="links_item"><a href="">关于腾讯</a></li>
                        <li class="links_item"><a href="">服务协议</a></li>
                        <li class="links_item"><a href="">运营规范</a></li>
                        <li class="links_item"><a href="">辟谣中心</a></li>
                        <li class="links_item"><a href="">客服中心</a></li>
                        <li class="links_item"><a href="">联系邮箱</a></li>
                        <li class="links_item"><a href="">侵权投诉</a></li>
                        <li class="links_item">
                            <p class="copyright">Copyright © 2012-<span id="s_copyright_year"></span> Tencent. All Rights Reserved.</p>
                        </li>
                    </ul>
                </div>

            </div>



            <a href="switch.html" class="navigation navigation-prev " aria-label="Previous page: switch">
                <i class="fa fa-angle-left"></i>
            </a>


            <a href="modal.html" class="navigation navigation-next " aria-label="Next page: modal">
                <i class="fa fa-angle-right"></i>
            </a>



        </div>
    </div>


    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>


    <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>



    <script src="../../gitbook/gitbook-plugin-search/search.js"></script>



    <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>



    <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>


    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"操作反馈","level":"1.3.4","depth":2,"next":{"title":"modal","level":"1.3.4.2","depth":3,"path":"component/modal.md","ref":"component/modal.md","articles":[]},"previous":{"title":"switch","level":"1.3.3.9","depth":3,"path":"component/switch.md","ref":"component/switch.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"theme-default":{"showLevel":false,"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"}}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"}},"file":{"path":"component/action-sheet.md","mtime":"2016-09-21T05:53:11.000Z","type":"markdown"},"gitbook":{"version":"3.2.0","time":"2016-09-22T09:40:22.799Z"},"basePath":"..","book":{"language":""}});
        });
    </script>




</div></body></html>